﻿using System;
using DDDNorthWind.Core.Domain.DomainEvents;

namespace DDDNorthWind.Core.Domain.Aggregate
{
    public interface IEventSuscriptor
    {
        void RegisterEvent<TDomainEvent>(Action<TDomainEvent> handler) where TDomainEvent : IDomainEvent;
        void Raise<TDomainEvent>(TDomainEvent @event) where TDomainEvent : IDomainEvent;
        void ClearEvents();
    }
}